package com.anpy.management.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 项目类型枚举
 */
@Getter
@AllArgsConstructor
public enum ProjectTypeEnum {
    
    PERSONAL("PERSONAL", "个人项目"),
    COMPANY("COMPANY", "公司项目"),
    OPEN_SOURCE("OPEN_SOURCE", "开源项目");
    
    private final String code;
    private final String desc;
    
    public static ProjectTypeEnum getByCode(String code) {
        for (ProjectTypeEnum type : ProjectTypeEnum.values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return null;
    }
}
